<?php
$form = $this->form;
$data = $this->data;
$items = $this->items;
?>
<div>
<table width="100%" style="height:480px;">
<tr>
<td width="50%" style="vertical-align:top;"> 
<?php
	$form->prepare();
	$form->setAttribute('action',$this->url(NULL,array('controller'=>'manage','action'=>'upload')));
	$form->setAttribute('method','post');
	$form->setAttribute('class','form-horizontal');
	$form->setAttribute('role','form');
	echo $this->form()->openTag($form);
?>
	<div class="form-group">
		<?php echo $this->formLabel($form->get('maHang'));?>
		<?php
		echo '<div class="col-sm-4">';
		echo $this->formElement($form->get('maHang'));
		echo $this->formElementErrors($form->get('maHang'));
		echo '</div>';
		?>
	</div>

	<div class="form-group">
		<?php echo $this->formLabel($form->get('idUser')); ?>
		<?php
		echo '<div class="col-sm-4">';
		echo $this->formElement($form->get('idUser'));
		echo $this->formElementErrors($form->get('idUser'));
		echo '</div>';
		?>
	</div>

	<div class="form-group">
		<?php echo $this->formLabel($form->get('soLuong')); ?>
		<?php
		echo '<div class="col-sm-4">';
		echo $this->formElement($form->get('soLuong'));
		echo $this->formElementErrors($form->get('soLuong'));
		echo '</div>';
		?>
	</div>

	<div class="form-group">
		<?php echo $this->formLabel($form->get('donGia')); ?>
		<?php
		echo '<div class="col-sm-4">';
		echo $this->formElement($form->get('donGia'));
		echo $this->formElementErrors($form->get('donGia'));
		echo '</div>';
		?>
	</div>

	<div class="form-group">
		<?php echo $this->formLabel($form->get('ngay')); ?>
		<?php
		echo '<div class="col-sm-4">';
		echo $this->formElement($form->get('ngay'));
		echo $this->formElementErrors($form->get('ngay'));
		echo '</div>';
		?>
	</div>

	<div class="form-group">
		<label for="submit" class='col-sm-4 control-label'> </label>
		<div class="col-sm-4">
		<?php echo $this->formElement($form->get('submit'));?>
		</div>
	</div>
<?php
	echo $this->form()->closeTag($form);
?>
</td>
<td width="50%" style="overflow-y:scroll;border-left:1px solid #ddd; padding:0px; vertical-align:top;">
	<?php
		echo '<ul class="myList">';
		foreach ($items as $item) {
			$tempAnh = explode('|', $item['hinhAnh']);
			$tempAnh = $tempAnh[0];
			echo '<li onclick="getInfrom();">';
			echo $item['maHang'];
			echo '<br/>';
			echo $item['gia'];
			echo '</li>';
		}
		echo '</ul>';
	?>
</td>
</tr>
</table>
</div>

<style>
.myList{
	padding-left: 0px;
	list-style: none;
}
.myList li{
	height: 60px;
	vertical-align: middle;
	border-bottom: 1px solid #eee;
}
.myList li:hover{
	background-color: #428bca;
	color: white;
	cursor: pointer;
}
</style>
<script>
	function getInfrom(){
		console.log(1);
		// var $item = $(e);
		// var content = $item.val();
		// console.log(content);
	}
</script>